﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for Utilities
/// </summary>
public class Utilities
{
	public Utilities()
	{
		//
		// TODO: Add constructor logic here
		//
	}

    public static string getLoginIID()
    {
        string result = "";
        try
        {
            result = HttpContext.Current.User.Identity.Name.Substring(3).ToLower();
        }
        catch (Exception)
        {

            throw;
        }
        if (HttpContext.Current.Session["Demo_iid"] != null && HttpContext.Current.Session["Demo_iid"].ToString().Trim().Length > 0)
        {
            return HttpContext.Current.Session["Demo_iid"].ToString();
        }

        result = HttpContext.Current.User.Identity.Name.Substring(3).ToLower();
        return result;
    }
}